﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CategoryLeft.ascx.cs"
    Inherits="UserControls_CategoryLeft" %>
<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
    <Scripts>
        <asp:ScriptReference Path="~/Javascripts/Gammar.Price.Navigation.js" />
    </Scripts>
</asp:ScriptManagerProxy>
<div class="ch sc2">频道分类</div>
<ul class="lc" id="cl">
    <asp:Repeater ID="Repeater1" runat="server" DataSourceID="ObjectDataSource1">
        <ItemTemplate>
            <li><a title="<%# DataBinder.Eval (Container.DataItem, "Cat_Name")%>" guid="<%#DataBinder.Eval (Container.DataItem, "Cat_Id") %>" href="javascript:void(0);"><%# DataBinder.Eval(Container.DataItem, "Cat_Name")%></a> <span style="color:#099">[<%# DataBinder.Eval(Container.DataItem, "ItemCount")%>]</span></li></ItemTemplate>
    </asp:Repeater>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="RetrieveList" 
        TypeName="Gammar.Price.Business.CategoryLogic">
        <SelectParameters>
            <asp:QueryStringParameter Name="guid" QueryStringField="cid" Type="Object" />
        </SelectParameters>
    </asp:ObjectDataSource>
</ul>

<script type="text/javascript" language="javascript">
    function clLoad() {
         $create(Gammar.Price.Web.Navigation, {displaySpan: $get('snav'), itemPanel: 'Category'}, {navigationClick: navClick}, null, $get('cl'));
    }
    
    function navClick(eventObject) {
        if ($get('Category') === null) {
            eventObject.target.href = String.format("../SLP/Default.aspx?cid={0}", eventObject.target.guid);
        }
    }
    
    Sys.Application.add_load(clLoad);
</script>

